<?php
use yii\bootstrap\ActiveForm;
use yii\helpers\Html;
$this->title = $title;
$this->params['breadcrumbs'][]='>';
$this->params['breadcrumbs'][] = ['label' => '订单管理', 'url' => ['/admin/order/list']];
$this->params['breadcrumbs'][]='>';
$this->params['breadcrumbs'][] = $this->title;
$this->registerCssFile('/web/admin/css/compiled/new-user.css');
$css = <<<CSS
.span8 div{
    display:inline;
}
.help-block-error {
    color:red;
    display:inline;
}
CSS;
$this->registerCss($css);
?>
<!-- main container -->
<div class="container-fluid">
    <div id="pad-wrapper" class="new-user">
        <div class="row-fluid header">
            <h3><?php echo $title?></h3>
        </div>
        <div class="row-fluid form-wrapper">
            <!-- left column -->
            <div class="span9 with-sidebar">
                <div class="container">
                    <?php
                    if (Yii::$app->session->hasFlash('info')) {
                        echo Yii::$app->session->getFlash('info');
                    }
                    $form = ActiveForm::begin([
                        'fieldConfig' => [
                            'template' => '<div class="span12 field-box">{label}{input}</div>{error}',
                        ],
                        'options' => [
                            'class' => 'new_user_form inline-input',
                            'enctype' => 'multipart/form-data'
                        ],
                    ]);
                    ?>
                    <div class="span12 field-box">
                        <label class="control-label" for="order-pic">关联产品</label>
                        <?php echo $productlist[$model->productid];?>
                    </div>
                    <div class="span12 field-box">
                        <label class="control-label" for="order-pic">合同编号</label>
                        <?php echo $model->contractNum;?>
                    </div>
                    <div class="span12 field-box">
                        <label class="control-label" for="order-pic">报修问题</label>
                        <?php echo $model->question;?>
                    </div>

                    <div class="span12 field-box">
                        <label class="control-label" for="order-pic">订单状态</label>
                        <?php echo $status_arr[$model->status];?>
                    </div>
                    <div class="span12 field-box">
                        <label class="control-label" for="order-pic">订单详情</label>
                        <?php echo $model->info;?>
                    </div>
                    <input type="hidden" id="order-id" class="form-control" name="Order[id]" value="<?php echo $model->id;?>">

<!--                    <div class="col-lg-2">-->
<!--                        <img src="" id="pic-img" />-->
<!--                        <input type="hidden" id="order-cover" class="form-control" name="Order[cover]" value="">-->
<!--                    </div>-->
<!--                    <Iframe class="imgiframe col-lg-8" src="--><?php //echo \yii\helpers\Url::to(['upload/image','picid'=>'pic-img','inputid'=>'order-cover'])?><!--" style="min-width:300px;min-height:150px;border:0" scrolling="no" frameborder="0" ></iframe>-->


                    <div class="col-lg-2">
                        <img src="<?php echo $model->coverUrl?>" id="pic-img" />
                        <?php echo $form->field($model, 'coverUrl')->hiddenInput();?>
                    </div>
                    <Iframe class="imgiframe col-lg-8" src="<?php echo \yii\helpers\Url::to(['upload/qiniu','picid'=>'pic-img','inputid'=>'order-coverurl'])?>" style="min-width:300px;min-height:150px;border:0" scrolling="no" frameborder="0" ></iframe>




                    <div class="span11 field-box actions">
                        <?php echo Html::submitButton('结束订单', ['class' => 'btn-glow primary']); ?>
                        <span>OR</span>
                        <a href="<?php echo \yii\helpers\Url::to(['order/list']);?>" class="btn btn-success">返回</a>
                    </div>
                    <?php ActiveForm::end(); ?>
                </div>
            </div>

            <!-- side right column -->
            <div class="span3 form-sidebar pull-right">
                <div class="alert alert-info hidden-tablet">
                    <i class="icon-lightbulb pull-left"></i>
                    请在左侧表单当中填写要添加的分类，请选择好上级分类
                </div>
                <h6>商城分类说明</h6>
                <p>该分类为无限级分类</p>
            </div>
        </div>
    </div>
</div>
<!-- end main container -->




